//
// File: eml_rand_mt19937ar_stateful.cpp
//
// MATLAB Coder version            : 5.1
// C/C++ source code generated on  : 21-Feb-2021 21:16:52
//

// Include Files
#include "eml_rand_mt19937ar_stateful.h"
#include "ChordalL1Mean_data.h"
#include "rt_nonfinite.h"
#include <cstring>

// Function Definitions
//
// Arguments    : void
// Return Type  : void
//
void eml_rand_mt19937ar_stateful_init()
{
  unsigned int r;

  //@>b8889
  std::memset(&                        //@>b4f85
              state                    //@>b4f86
              [                        //@>b4f82
              0],                      //@>c81cd
              0,                       //@>b4f84
              625U                     //@>b4f8c
              *                        //@>b4f8b
              sizeof(unsigned int));

  //@>860d8
  r                                    //@>860d7
    =                                  //@>89921
    5489U;

  //@>98b2c
  state                                //@>86104
    [                                  //@>86115
    0]                                 //@>860db
    =                                  //@>89922
    5489U;

  //@>8610e
  for (int                             //@>c81d2
       mti =                           //@>860f6
       0;                              //@>c81da
       mti <                           //@>860f4
       623;                            //@>c81d7
       mti                             //@>c81de
       ++) {
    //@>860e0
    r                                  //@>860df
      = ((                             //@>860e1
          r                            //@>a6c38
          ^                            //@>860e3
          r                            //@>86101
          >>                           //@>86116
          30U)                         //@>a6c35
         *                             //@>86117
         1812433253U                   //@>a6fcb
         +                             //@>8dd73
         mti)                          //@>a6fcc
      +                                //@>860e7
      1U;

    //@>98b3c
    state                              //@>86105
      [                                //@>8dd7c
      mti                              //@>8e012
      +                                //@>86107
      1]                               //@>860e8
      =                                //@>860ec
      r;
  }

  //@>98b32
  state                                //@>86109
    [                                  //@>86118
    624]                               //@>860ee
    =                                  //@>86119
    624U;
}

//
// File trailer for eml_rand_mt19937ar_stateful.cpp
//
// [EOF]
//
